//
//  BXSServiceB.m
//  BXSModuleB
//
//  Created by 金申生 on 2017/3/2.
//  Copyright © 2017年 Hangzhou WeiEase Tech Co., Ltd. All rights reserved.
//

#import "BXSServiceB.h"
#import "BXSModelService.h"

@implementation BXSServiceB

- (instancetype)init
{
    if (self = [super init]) {
        
        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
            id<BXSModelAProtocol> modelA = [ServiceA getModelA];
            NSLog(@"ServiceB uses ServiceA's model: %@", [modelA name]);
        });
        
    }
    
    return self;
}

- (BXSModelB *)getModelB
{
    BXSModelB *model = [[BXSModelB alloc] init];
    model.name = @"I'm Model B";
    
    return model;
}

@end
